package com.example.yoho.mvp.model;

import com.example.lib_core.mvp.model.BaseModel;
import com.example.lib_core.network.RetrofitManager;
import com.example.yoho.mvp.contract.BrandContract;
import com.example.yoho.mvp.model.entity.BrandGoodsEntity;
import com.example.yoho.mvp.model.entity.BrandListEntity;
import com.example.yoho.mvp.model.entity.BrandTabEntity;
import com.example.yoho.mvp.model.entity.MenuEntity;

import javax.inject.Inject;

import io.reactivex.Observable;

public class BrandModel extends BaseModel implements BrandContract.Model {
    @Inject
    public BrandModel() {
    }

    @Override
    public Observable<MenuEntity> menuModel() {
        return RetrofitManager.getInstance().getRetrofit().create(AppApi.class).menuRequest();
    }

    @Override
    public Observable<BrandTabEntity> brandTabModel(String request) {
        return RetrofitManager.getInstance().getRetrofit().create(AppApi.class).brandTabRequest(request);
    }

    @Override
    public Observable<BrandGoodsEntity> brandGoods(String request) {
        return RetrofitManager.getInstance().getRetrofit().create(AppApi.class).brandGoodsRequest(request);
    }

    @Override
    public Observable<BrandListEntity> brandList(String request) {
        return RetrofitManager.getInstance().getRetrofit().create(AppApi.class).branListRequest(request);
    }


}
